1. Technical Field
The present invention is directed generally toward a method and apparatus for restoring nexus configuration values in a Small Computer Systems Interface (SCSI) device, and more specifically, to performing this restoration by hardware means rather than by firmware.
2. Description of the Related Art
A typical computer system includes a central processing unit (CPU) for performing computations, memory, and peripheral devices such as display monitors, printers, and disk drives for offline storage and communication with the outside world. Without something to interconnect these components, however, they cannot function as a system.
The primary apparatus for the interconnection of components in a computer system is known as a bus. A bus is a group of conductors that allows for communication between devices. A bus is like a data expressway, where the computer system components are positioned at the entrance and exit ramps. For instance, the central processing unit, memory, and peripheral devices may all be connected in parallel to a single bus.
Several different levels of buses may exist in a computer system. At the lowest level is the component-oriented (local) bus, which connects directly to the CPU. Component-oriented buses are generally specific to the particular type of CPU being used. For instance, the component-oriented bus in a computer system built around a Pentium microprocessor (CPU) is incompatible with a PowerPC microprocessor (CPU).
In many computers, however, there are two or more levels of buses (particularly in more modern computer systems). The component-oriented bus is often supplemented with a backplane or system bus. A backplane bus does not interface directly with the CPU, but is connected to the component-oriented bus by means of a backplane-to-host bridge.
Using a backplane bridge has a number of advantages, but two of them are of particular importance. First, because backplane buses are not connected to the component-oriented bus and CPU directly, when a component on the backplane bus fails, there is less likelihood of complete system failure, because the failure is isolated. Second, because backplane buses need not be specific to a particular model of processor, it is possible to have backplane bus standards that are independent of the choice of processor. This allows peripheral devices such as input/output (I/O) adapters to be interchangeable among disparate computing platforms.
One level further out from backplane buses are peripheral bus systems. Peripheral bus systems are true buses, but they are generally accessed through an input/output adapter situation on a backplane bus. Peripheral buses are commonly used to control storage devices, such as floppy disk drives and hard drives. Popular peripheral bus standards include the Small Computer System Interface (SCSI) standard and the Universal Serial Bus (USB) standard.
A SCSI bus can be connected to a number of peripheral devices, with current standards allowing for 16 devices. A host adapter is necessary for connection to the main processor, with the host adapter taking one of the sixteen device locations. Control of activity across the bus is not handled from a central location, but is distributed across all the devices using the bus, and happens independently of the central processing unit (CPU). Each SCSI device contains an integral controller, which can assert a need for access to the bus, recognize whether it has gained the desired access, and communicate with the other controllers regarding specific parameters for the transfer of information. Since each device can communicate with each other device on the bus, each controller must negotiate the protocols of data exchange with each of the other controllers and this negotiated information must be stored for future use. Additionally, negotiated parameters can vary depending on whether the instant device is the initiator of the interchange or the target of it, so values must be stored for either possibility. Thus, for a SCSI bus that can handle 16 devices, each controller must store information for the 15 other devices on the bus, with values for being either the initiator or the target, for a total of 30 different sets of information saved.
Whenever a device is selected for access to the bus, the correct information for the exchange must be moved to the registers used in the information exchange. There is a need to assure that these values are restored as quickly as possible, or the timely operation of the bus can be affected. Prior art has used software or firmware to restore these values quickly.
The present invention provides a hardware state machine, that is, a hard-wired circuit, to automatically restore SCSI configuration values within the controller. These values include parameters such as transfer speed, transfer bus width, synchronous offset, information unit transfers, etc. Parameters are stored in a memory array, indexed by the device identification numbers, and are automatically restored during the selection/reselection process.